package com.lt.flashcard.model.entity;

import java.util.Date;

import com.google.code.morphia.annotations.Embedded;

/**
 * Detail message of a message
 * @author ocsen
 *
 */
@Embedded
public class MessageDetail {

	private Date created = new Date();
	
	private String message = "";
	
	private Long userid;
	
	private String username;
	
	private String useravatar;

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUseravatar() {
		return useravatar;
	}

	public void setUseravatar(String useravatar) {
		this.useravatar = useravatar;
	}
	
	/**
	 * Clone a message detail
	 */
	public MessageDetail clone() {
		MessageDetail d = new MessageDetail();
		d.setCreated(getCreated());
		d.setMessage(getMessage());
		d.setUseravatar(getUseravatar());
		d.setUserid(getUserid());
		d.setUsername(getUsername());
		return d;
	}
}
